#!/usr/bin/python
# -*- coding: cp1250 -*-

import os
import re
import sys
import time
import string
import pepe.p_oslevel.basic as osb

fw_slash = lambda x: re.sub(r'\\', '/', x)

if __name__ == "__main__":
    ''' '''
    path = fw_slash(osb.wai())

    if  len(sys.argv) <> 2:
        sys.stderr.write('usage: 7zpy <7zip file or mask-to-be-zipped>')
    else:
        inpf = path + sys.argv[1]
        ifna = os.path.split(inpf)[1]

        if os.environ['OS'] in ('Windows_NT'):
            if sys.argv[1][-3:] == '.7z':
                # extract
                c = '"C:/Program Files/7-Zip/7z.exe" x -y ' + inpf
                os.system(c)
            else:
                # compress
                pass
